﻿namespace AGooday.AgChat.Api.Models
{
    public class Message
    {
        public int Id { get; set; }
        public string Content { get; set; }
        public int SenderId { get; set; }
        public int? ReceiverId { get; set; } // For private messages
        public int? GroupId { get; set; } // For group messages
        public string MessageType { get; set; } = "text"; // text, image, file
        public DateTime SentAt { get; set; } = DateTime.UtcNow;
        public bool IsRead { get; set; } = false;

        public virtual User Sender { get; set; }
        public virtual User Receiver { get; set; }
        public virtual Group Group { get; set; }
    }
}
